<?php
/**
 * Created by PhpStorm.
 * User: lscm
 * Date: 14-7-11
 * Time: 下午5:51
 */

namespace common;


class dbutil {
    const dbName = "surfingHelper";
    const dbUser = "root";
    const dbPassword = "znlsonger";
    const dbServer = "localhost";
    static function getConnect(){
        $con=mysqli_connect(dbutil::dbServer,dbutil::dbUser,dbutil::dbPassword, dbutil::dbName);

        if (mysqli_connect_errno()) {
            echo "Failed to connect to MySQL: " . mysqli_connect_error();
            return null;
        }
        return $con;
    }
}